<template>
	<view>
		<view class="search_box">
			<view class="categories_icon" @click="jumpCategory">
				<image src="/static/categories.png" mode="widthFix"></image>
			</view>
			<view class="search_content" @click="gotoSearch">
				<input type="text" class="search_inp" disabled="true" placeholder="ins超火短t"
					placeholder-style="font-size:24rpx;color:#999;" />
			</view>
			<view class="cart">
				<image src="/static/liaotian.png" mode="widthFix"></image>
			</view>
		</view>
	</view>
</template>

<script setup>
	const gotoSearch = () => {
		uni.navigateTo({
			url: '/pages/search/search'
		})
	}
	const jumpCategory = () => {
		uni.navigateTo({
			url: '/pages/category/category'
		})
	}
</script>

<style lang="scss">
	.search_box {
		display: flex;
		box-sizing: border-box;
		width: 100%;
		border-bottom: 2rpx solid #e5e5e5;
		padding: 14rpx 10rpx;
		align-items: center;
		justify-content: space-around;
		background-color: #fff;

		image {
			width: 44rpx;
			;
		}

		.categories_icon,
		.cart {
			width: 100rpx;
			height: 60rpx;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.search_content {
			flex: 1;

			.search_inp {
				background-color: #eee;
				padding-left: 60rpx;
				height: 60rpx;
				background-image: url('/static/search.png');
				background-repeat: no-repeat;
				background-size: 31rpx auto;
				border-radius: 6rpx;
				background-position: 15rpx center;
				pointer-events: none;
			}
		}
	}
</style>